/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modulo1.cdp;

import java.util.Date;
import java.util.List;
import javax.persistence.*;

/**
 *
 * @author williams
 */
@Entity
public class Aula extends Objeto {

    @Temporal(TemporalType.DATE)
    private Date dataAula;    
    private Long qntdHoras;
    private String conteudo;
    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name="aula_matricula",
            joinColumns=@JoinColumn(name="id_aula"),
            inverseJoinColumns=@JoinColumn(name="id_matricula"))
    private List<Matricula> listaMatriculas;
    @JoinColumn(name = "id_turma")
    @ManyToOne(fetch = FetchType.LAZY)
    private Turma turma;

    public String getConteudo() {
        return conteudo;
    }

    public void setConteudo(String conteudo) {
        this.conteudo = conteudo;
    }

    public Date getData() {
        return dataAula;
    }

    public void setData(Date data) {
        this.dataAula = data;
    }

    public Turma getTurma() {
        return turma;
    }

    public void setTurma(Turma turma) {
        this.turma = turma;
    }

    public List<Matricula> getListaMatriculas() {
        return listaMatriculas;
    }

    public void setListaMatriculas(List<Matricula> listaMatriculas) {
        this.listaMatriculas = listaMatriculas;
    }

    public Long getQntdHoras() {
        return qntdHoras;
    }

    public void setQntdHoras(Long qntdHoras) {
        this.qntdHoras = qntdHoras;
    }
}
